package com.library.action;

import java.io.IOException;

import com.library.model.Bookinfo;
import com.library.service.BookService;

public class BookAction extends BaseAction{
	private BookService bookService;
	private Bookinfo book;
	private int userid ;
	public String borrowBooks(){
		//System.out.println("---------------------------"+userid);
		bookService.doborrow(book.getBookid(),userid);
		/*try {
			response.sendRedirect("allBook!toBookList.action");
		} catch (IOException e) {
			e.printStackTrace();
		}*/
		return "index";
	}
	public BookService getBookService() {
		return bookService;
	}
	public void setBookService(BookService bookService) {
		this.bookService = bookService;
	}
	public Bookinfo getBook() {
		return book;
	}
	public void setBook(Bookinfo book) {
		this.book = book;
	}
	public int getUserid() {
		return userid;
	}
	public void setUserid(int userid) {
		this.userid = userid;
	}
	
}	
